package cn.feizhu.aimarket.ai.client;


import jakarta.annotation.Resource;
import lombok.Data;
import org.springframework.ai.chat.client.ChatClient;
import org.springframework.ai.chat.model.ChatModel;
import org.springframework.ai.chat.prompt.ChatOptions;
import org.springframework.ai.tool.ToolCallback;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Data
@Configuration
public class WriterRouterChatClientFactory {

    private static final String SYSTEM_MESSAGE = """
            你是一个智能路由
            如果用户要生成文字内容文章故事等返回 pass
            否则返回 fail
            """;

    @Resource
    private ChatModel dashscopeChatModel;

    // TODO 这里还是交给下层创建？

    public ChatClient createRoutingClient() {

        return ChatClient
                .builder(dashscopeChatModel)
                .defaultSystem(SYSTEM_MESSAGE)
                .build();
    }

}
